package com.lagou.edu.controller;

import com.lagou.edu.dto.ResumeDto;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

/**
 *
 */
public class ResumeForm implements Serializable {

    private Long id;
    @NotBlank(message = "名字不能为空")
    private String name;
    @NotBlank(message = "地址不能为空")
    private String address;
    @NotBlank(message = "手机号不能为空")
    private String phone;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public ResumeDto toDto() {
        ResumeDto resumeDto=new ResumeDto();
        BeanUtils.copyProperties(this,resumeDto);
        return resumeDto;
    }
}
